<?
$this->layout='blank.php';
/*
CodiCapa:O101O102O103O104O105
ImgWidth:711
ImgHeight:500
Zoom:0
CentroX:26758000
CentroY:82177000
Idioma:ca
macros:*/

    $ch = curl_init();

    // Now set some options (most are optional)

    // Set URL to download
    curl_setopt($ch, CURLOPT_URL, "http://w20.bcn.cat/Web_Obres_WS/WebObresWS.asmx/EquipamientosPorCapaPixel");

    // Set a referer
//     curl_setopt($ch, CURLOPT_REFERER, "http://www.mygooltracking.com");

  //post
  curl_setopt ($ch, CURLOPT_POST, 1);
  curl_setopt ($ch, CURLOPT_POSTFIELDS, "CodiCapa=O101O102O103O104O105&ImgWidth=711&ImgHeight=500&Zoom=0&CentroX=26758000&CentroY=82177000&Idioma=ca&macros=");

    // User agent
    curl_setopt($ch, CURLOPT_USERAGENT, "MozillaXYZ/1.0");

    // Include header in result? (0 = yes, 1 = no)
    curl_setopt($ch, CURLOPT_HEADER, 0);

    // Should cURL return or print out the data? (true = return, false = print)
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);

    // Timeout in seconds
    curl_setopt($ch, CURLOPT_TIMEOUT, 10);

    // Download the given URL, and return output
    $output = curl_exec($ch);

    // Close the cURL resource, and free system resources
    curl_close($ch);

    echo $output;

?>